{
  "openapi": "3.0.1",
  "info": {
    "title": "Authorization Service",
    "version": "v1"
  },
  "servers": [
    {
      "url": "/auth"
    }
  ],
  "paths": {
    "/connect/token": {
      "post": {
        "tags": [
          "ConnectToken"
        ],
        "summary": "Get new Access Token with defined scopes",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "client_id": {
                    "type": "string"
                  },
                  "client_secret": {
                    "type": "string"
                  },
                  "grant_type": {
                    "type": "string"
                  },
                  "scope": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "display_name": {
                    "type": "string"
                  },
                  "bsn": {
                    "type": "string"
                  }
                }
              },
              "encoding": {
                "client_id": {
                  "style": "form"
                },
                "client_secret": {
                  "style": "form"
                },
                "grant_type": {
                  "style": "form"
                },
                "scope": {
                  "style": "form"
                },
                "name": {
                  "style": "form"
                },
                "display_name": {
                  "style": "form"
                },
                "bsn": {
                  "style": "form"
                }
              }
            }
          }
        },
         "responses": {
          "400": {
            "description": "Bad Request"
          },
          "200": {
             "description": "Returns TokenRespoinse containing Access Token and additional properties.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
      }
    },
    "components": {
      "schemas": {
        "TokenResponse": {
          "type": "object",
          "properties": {
            "access_token": {
              "type": "string"
            },
            "scope": {
              "type": "string"
            },
            "token_type": {
              "type": "string"
            },
            "expires_in": {
              "type": "int32"
            }
          },
          "additionalProperties": false
        }
      }
    }
  }
}